<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of ProductGroupActiveMenuElement
 *
 * @author aneto
 */
class ProductGroupActiveMenuElement extends ActiveMenuElement{

	private $node;

    public function __construct(ProductGroup $node){
		$this->node = $node->toArray();
	}


	public function isChildrenOf(MenuElement $obj){

		if($obj instanceof ProductGroupMenuElement){
			return $obj->getLft() <= $this->node['lft'] && $obj->getRgt() >= $this->node['rgt'];
		};

		return false;
	}
}
?>
